package com.thb.pay.api.agent;


import com.thb.pay.api.agent.fallback.AgentAgentpayPassageServiceApiFallbackFactory;
import com.thb.pay.api.agent.vo.req.AgentAgentpayPassageReq;
import com.thb.pay.api.agent.vo.resp.AgentAgentpayPassageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 代理商-代付通道表 前端控制器
 * </p>
 *
 * @author lucky
 * @since 2019-07-21
 */
@FeignClient(value = "pay-service", fallbackFactory = AgentAgentpayPassageServiceApiFallbackFactory.class)
@RequestMapping("/agentAgentpayPassageApi")
public interface AgentAgentpayPassageServiceApi {
    /**
     * @param agentId
     * @return
     * @方法名称
     * @功能描述 获取代理商-代付通道信息列表
     * @作者: lucky
     * @创建时间: 2019/10/14
     **/
    @RequestMapping(value = "/findListByAgentId", method = RequestMethod.GET)
    List<AgentAgentpayPassageVo> findListByAgentId(@RequestParam("agentId") Long agentId);

    /**
     * @param agentId
     * @return
     * @方法名称
     * @功能描述 获取代理商+代付通道ID 明细
     * @作者: lucky
     * @创建时间: 2019/10/14
     **/
    @RequestMapping(value = "/getByAgentIdAndPassageId", method = RequestMethod.GET)
    AgentAgentpayPassageVo getByAgentIdAndPassageId(@RequestParam("agentId") Long agentId, @RequestParam("agentpayPassageId") Long agentpayPassageId);

    /**
     * @param agentAgentpayPassageReq
     * @return
     * @方法名称
     * @功能描述 添加代理商代付通道渠道
     * @作者: lucky
     * @创建时间: 2019/10/14
     **/
    @RequestMapping(value = "/addOrUpdate", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void addOrUpdate(@RequestBody AgentAgentpayPassageReq agentAgentpayPassageReq);
}
